<template>
  <div>
<h2>用户登录列表</h2>
<table class="table table-bordered">
  <tr>
    <td>账号id</td>
    <td>账号</td>
    <td>密码</td>
  </tr>
  <tr v-for="item in list" :key="item.UL_Id">
    <td>{{ item.UL_Id }}</td>
    <td>{{ item.UL_Name }}</td>
    <td>{{ (item.UL_Pwd).substr(0,4)+'***' }}</td>
  </tr>
</table>
  </div>
</template>

<script setup lang="ts">

import {reactive,toRefs,onMounted} from 'vue'
import axios from 'axios'
import {useRouter} from 'vue-router'
const router=useRouter()

const data:any=reactive({
  list:[]
})

let {list} =toRefs(data)

onMounted(()=>{
  show()
})

const show=()=>{
  axios({
    url:'/api/Users/GetShow',
    method:'get',
  }).then(res=>{
    console.log(res);
    list.value=res.data.data
  }).catch(err=>{
    console.log(err);
  })
}


</script>


<style scoped>

</style>